import { AjaxPlugin } from 'vux'

// axios 配置
AjaxPlugin.$http.defaults.timeout = 20000
AjaxPlugin.$http.defaults.baseURL = 'http://api.lssqx.com/'

// http request 拦截器
AjaxPlugin.$http.interceptors.request.use(
  config => {
    return config
  },
  err => {
    return Promise.reject(err)
  })

// http response 拦截器
AjaxPlugin.$http.interceptors.response.use(
  response => {
    return response
  },
  error => {
    return Promise.reject(error)
  })

export default AjaxPlugin
